<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$return['params']=array('jy'=>1);
	set_html('title','我的寄卖');
	exi($return);
}
if($_RQ['op']=='list'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$list=pdo_getslice('jy_yangjidan_jimai',$params,array($pindex,$psize),$total,$fields,'','id desc');
	if($list){
		$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
		$dj_huigouday=$this->setting['dj_huigouday'];
		foreach($list as &$item){
			if($item['endtime']<time()){
				$this->model('model')->huigou($item);
				$item['status']=3;
			}
			$item['endday']=date('Y-m-d',$item['endtime']);
			$item['statustitle']=$this->jimai_status[$item['status']];
		}
	}
	$return['list']=$list;
	exi($return);
}
